// 高级查询传入的列和类型，需要手动对应类型
export const queryObj = [
  {
    label: '设备名称',
    value: 'materialsName',
    type: 'input'
  },
  {
    label: '所属类别',
    value: 'category',
    type: 'input'
  }
]
// 材料设备表格的列展示
export const tableColumns = [

  {
    title: '设备名称',
    field: 'materialsName'
  },
  {
    title: '规格型号',
    field: 'num'
  },
  {
    title: '计量单位',
    field: 'unit',
  },
  {
    title: '成本单价',
    field: 'unitCost'
  },
  {
    title: '所属类别',
    field: 'category',
    width: '10%'
  },
  {
    title: '最大安全库存',
    field: 'maxSafeStock'
  },
  {
    title: '最小安全库存',
    field: 'minSafeStock'
  },
  {
    title: '设备编码',
    field: 'materialsCode'
  },
  {
    title: '创建人',
    field: 'createByName'
  },
  {
    title: '创建时间',
    field: 'createTime'
  },
  // {
  //   title: '供应商',
  //   field: 'supplierCode'
  // },
  {
    title: '备注',
    field: 'remarks'
  },
  {
    title: '操作',
    width: '200px',
    field: 'action',
    fixed: 'right',
    slot: true
  }
]
//价格表格的列展示
// export const priceTableColumns = [
//   {
//     title: '对应材料设备code',
//     dataIndex: 'materialsCode',
//     scopedSlots: { customRender: 'materialsCode' },
//
//   },
//   {
//     title: '对应计量单位',
//     dataIndex: 'unit',
//     scopedSlots: { customRender: 'unit' },
//     width: '15%'
//   },
//   {
//     title: '租出单价',
//     dataIndex: 'leaseOutPrice',
//     scopedSlots: { customRender: 'leaseOutPrice' },
//     width: '15%'
//   },
//   {
//     title: '租入单价',
//     dataIndex: 'leaseInPrice',
//     scopedSlots: { customRender: 'leaseInPrice' },
//     width: '15%'
//   },
//   {
//     title: '销售单价',
//     dataIndex: 'salePrice',
//     scopedSlots: { customRender: 'salePrice' },
//     width: '15%'
//   },
//   {
//     title: '操作',
//     width: '200px',
//     dataIndex: 'action',
//     fixed: 'right',
//     slot: true,
//     scopedSlots: { customRender: 'action' },
//   }
//
// ]
export const priceAddObj={
  id:"",
  materialsCode:"",
  unit:"",
  leaseOutPrice:"",
  leaseInPrice:"",
  salePrice:"",
}
export const unitAddObj={
  id:"",
  materialsCode:"",
  unit:"",
  goalUnit:"",
  num:"",
  goalNum:"",
}
//取消价格表添加
export function clearPriceAddObj() {
  this.priceAddObj = {
    id:"",
    materialsCode:"",
    unit:"",
    leaseOutPrice:"",
    leaseInPrice:"",
    salePrice:"",
  }
}
//取消单位换算表添加
export function clearUnitAddObj() {
  this.priceAddObj = {
    id:"",
    materialsCode:"",
    unit:"",
    leaseOutPrice:"",
    leaseInPrice:"",
    salePrice:"",
  }
}
//单位换算表格的列展示
export const unitTableColumns = [
  {
    title: '对应材料设备code',
    scopedSlots: { customRender: 'materialsCode' },
    dataIndex: 'materialsCode'
  },
  {
    title: '原单位',
    scopedSlots: { customRender: 'unit' },
    dataIndex: 'unit'
  },
  {
    title: '目标单位',
    scopedSlots: { customRender: 'goalUnit' },
    dataIndex: 'goalUnit'
  },
  {
    title: '原数量',
    scopedSlots: { customRender: 'num' },
    dataIndex: 'num'
  },
  {
    title: '目标数量',
    scopedSlots: { customRender: 'goalNum' },
    dataIndex: 'goalNum'
  },
  {
    title: '操作',
    width: '100px',
    dataIndex: 'action',
    fixed: 'right',
    slot: true,
    scopedSlots: { customRender: 'action' },
  },
]
export const MaterialsData = [
  {
    baseMaterials: {
      id: '',
      materialsCode: '',
      materialsName: '',
      category: '',
      supplierCode: '',
      unit: '',
      num: '',
      unitCost: '',
      minSafeStock: '',
      maxSafeStock: '',
      remarks: '',
      delFlag: '',
      createBy: '',
      createByName: '',
      createTime: '',
      updateBy: '',
      updateByName: '',
      updateTime: ''
    },
    baseMaterialsPrices: [{
      id: '',
      materialsCode: '',
      unit: '',
      leaseOutPrice: '',
      leaseInPrice: '',
      salePrice: '',
      createBy: '',
      createByName: '',
      createTime: '',
      updateBy: '',
      updateByName: '',
      updateTime: ''
    }],
    baseUnitConversions: [{
      id: '',
      materialsCode: '',
      unit: '',
      goalUnit: '',
      num: '',
      goalNum: '',
      createBy: '',
      createByName: '',
      createTime: '',
      updateBy: '',
      updateByName: '',
      updateTime: ''
    }]
  },]
